/**
 * @author     Gabor Greif <ggreif@gmail.com>
 * @copyright  2009-2010 Gabor Greif
 * @license    http://www.opensource.org/licenses/mit-license.php  MIT License
 * @version    Release: 0.0
 */

#ifndef micker_CINFO_hpp
#define micker_CINFO_hpp

#include "CommandMap.hpp"

namespace micker {

struct Info : Comm<const CommandMap&>
{
    Info(const CommandMap& cm)
    : Comm<const CommandMap&>(ArgumentsMismatch<0>::proc<Env, proc>, cm)
    {}

    static std::string proc(Pref env)
    {
        std::string accum;
        typedef CommandMap::const_iterator iter;
        for (iter i(env.begin()), e(env.end()); i != e; ++i)
        {
            if (!accum.empty())
            {
                accum.push_back(' ');
            }
            accum += i->first;
        }
        return accum;
    }
};

} // namespace micker

#endif // micker_CINFO_hpp
